﻿using System;
using GC_FFW.SoccerfameParser.Abstractions.Interfaces.Factories;
using GC_FFW.SoccerfameParser.Abstractions.Managers;

namespace GC_FFW.SoccerfameParser.Abstractions.Adapters
{
	public abstract class BaseAdapter
	{
		#region Constants

		protected const string MIDDLE_PAGE_DIV_ID = "middle_page";

		#endregion

		#region Properties

		protected HtmlDocumentBaseManager HtmlDocumentManager { get; private set; }

		public ISoccerfameDataHelperFactory SoccerfameDataHelperFactory { get; private set; }

		#endregion

		#region Constructors

		protected BaseAdapter(HtmlDocumentBaseManager htmlDocumentManager, ISoccerfameDataHelperFactory soccerfameDataHelperFactory)
		{
			if (htmlDocumentManager == null)
				throw new ArgumentNullException(string.Format("htmlDocumentManager"));
			HtmlDocumentManager = htmlDocumentManager;

			if (soccerfameDataHelperFactory == null)
				throw new ArgumentNullException(string.Format("soccerfameDataHelperFactory"));
			SoccerfameDataHelperFactory = soccerfameDataHelperFactory;
		}

		#endregion
	}
}
